package com.demo2do.fms.admin.service.supplier.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.demo2do.core.persistence.annotation.Dao;
import com.demo2do.fms.admin.dao.supplier.SupplierProfileDao;
import com.demo2do.fms.admin.service.DataServiceImpl;
import com.demo2do.fms.admin.service.supplier.SupplierBusinessHistoryService;
import com.demo2do.fms.entity.supplier.common.SupplierBusinessHistory;

/**
 * 
 * @author Wy
 *
 */
@Service("supplierBusinessInfoService")
public class SupplierBusinessHistoryServiceImpl extends DataServiceImpl<SupplierBusinessHistory> implements SupplierBusinessHistoryService{

    @Dao
    private SupplierProfileDao supplierBusinessInfoDao;
    
    /*
     * (non-Javadoc)
     * @see com.demo2do.fms.admin.service.supplier.SupplierBusinessInfoService#listSupplierBusinessInfo(java.lang.Long)
     */
    public List<SupplierBusinessHistory> listSupplierBusinessHistory(Long supplierId) {
        return supplierBusinessInfoDao.listSupplierBusinessHistory(supplierId);
    }
    
    /*
     * (non-Javadoc)
     * @see com.demo2do.fms.admin.service.supplier.SupplierBusinessInfoService#edit(com.demo2do.fms.entity.supplier.SupplierBusinessInfo)
     */
    public void edit(SupplierBusinessHistory supplierBusinessHistory) {
        
        genericDaoSupport.update(supplierBusinessHistory);
        
    }


    /*
     * (non-Javadoc)
     * @see com.demo2do.fms.admin.service.supplier.SupplierBusinessInfoService#delete(com.demo2do.fms.entity.supplier.SupplierBusinessInfo)
     */
    public void delete(SupplierBusinessHistory supplierBusinessHistory) {
        genericDaoSupport.update(supplierBusinessHistory.delete());
    }
    
}
